/*
 *  Arrow
 *
 *  Created by David Giovannini on 1/5/07.
 *  Copyright 2007 Software by Jove. All rights reserved.
 *
 */
 
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/auto_unit_test.hpp>

#if WIN32
	#define NOMINMAX
    #include "windows.h"
#else
    #include <unistd.h>
#endif

void test_sleep( double secs )
{
#if WIN32
	::Sleep( (int)(secs * 1000.0) );
#else
    int wholeUnits = (int)secs;
    if ( wholeUnits ) ::sleep( wholeUnits );
    int subUnits = ( secs - (double)wholeUnits ) * 1000000.0;
    if ( subUnits >= 100 ) ::usleep( subUnits  );
#endif
}